#pragma once
#include "DGeometry.h"

namespace Skill
{
	namespace Ode
	{
		ref class DMatrix4;
		ref class DVector3;
		ref class DSpace;

		namespace Geometries
		{			
			public ref class DSphere : DGeometry
			{			
			public:
				///<summary>
				/// Create a sphere
				///</summary>
				///<param name = "radius">  the radius of the sphere.</param>				
				///<remarks> The point of reference for a sphere is its center. </remarks>				
				DSphere(DSpace^ space, dReal radius);

				///<summary>
				/// Gets or set the radius of a sphere geom.
				///</summary>
				VALUE_PROP_DECLARATION_GETSET(dReal,Radius);				

				///<summary>
				/// Calculate the depth of the a given point within a sphere.
				///</summary>
				///<param name = "x">  the X coordinate of the point.</param>
				///<param name = "y">  the Y coordinate of the point.</param>
				///<param name = "z">  the Z coordinate of the point.</param>				
				///<returns>
				/// returns The depth of the point. Points inside the sphere will have a 
				/// positive depth, points outside it will have a negative depth, and points
				/// on the surface will have a depth of zero.
				///</returns>
				dReal PointDepth(dReal x, dReal y, dReal z);

				///<summary>
				/// Calculate the depth of the a given point within a sphere.
				///</summary>
				///<param name = "p"> The point. </param>				
				///<returns>
				/// returns The depth of the point. Points inside the sphere will have a 
				/// positive depth, points outside it will have a negative depth, and points
				/// on the surface will have a depth of zero.
				///</returns>
				dReal PointDepth(DVector3^ p);
				
			};
		}
	}
}